getApp();

Page({
    data: {
        title: "程序员黄历",
        time: "",
        week: "",
        good_luck: "",
        bad_luck: "",
        directions: "",
        drinks: "",
        star: ""
    },
    bindViewTap: function() {
        wx.navigateTo({
            url: "../logs/logs"
        });
    },
    onLoad: function(a) {
        wx.showShareMenu(), wx.setNavigationBarTitle({
            title: "程序员黄历"
        });
        var t = this;
        wx.request({
            url: "https://api.zclhl.cn/home/date/index_chengxu",
            header: {
                "Content-Type": "application/x-www-form-urlencoded"
            },
            success: function(a) {
                console.log(a.data), t.setData({
                    time: a.data.today,
                    week: a.data.week,
                    good_luck: a.data.good_luck,
                    bad_luck: a.data.bad_luck,
                    directions: a.data.directions,
                    drinks: a.data.drinks,
                    star: a.data.star
                });
            }
        });
    }
});